<?php 
$sef_url = escape($sef_url);
$_SESSION['search'] = $sef_url;

head('Search for: '.$_SESSION['search']);

?>

        <div id="content">
			
			<div class="left full">
				
				<h1><?=__SEARCH?></h1>
				
				<p><?=__SEARCH_RESULTS?>: "<?=$_SESSION['search']?>"</p><br>
				
                <?=stripslashes($row->description)?>
				
                
                 <?php
            	///require '../include/frontpaging.inc.php';
				$sql = "SELECT
				c.sef_url,
				c.page_id,
				d.title,
				d.description
				
			FROM
				pages AS c,
				page_description AS d
			WHERE
				c.page_id = d.page_id
				AND
				d.lang_id = '".$_SESSION['lang_id']."'
				AND c.published
				
				AND ( d.title LIKE '%".$sef_url."%' OR d.description LIKE '%".$sef_url."%')
				
			  ";
			  
				$result = query($sql);
			
			   while ($row = mysql_fetch_object($result)) {
			?>
            
			<div class="new">
				<div class="title"><a href="<?=HTML_BASE.$_SESSION['lang']?>/<?=$row->sef_url?>"><?=$row->title?></a></div>
				<div class="content">
				<p><?=strip_tags(text_format($row->description, 200))?>...</p>
				</div>
				<a class="readmore" href="<?=HTML_BASE.$_SESSION['lang']?>/<?=$row->sef_url?>"><?=__Read_more?></a>
			</div>
			<?php }?>
                
              
			  <br><br> 
              <h5><?=__RESULT_NEWS?></h5>  
                
                
                <?php
            	///require '../include/frontpaging.inc.php';
				$sql = "SELECT
				c.sef_url,
				c.new_id,
				
				
				d.title,
				d.description
				
			FROM
				news AS c,
				news_description AS d
			WHERE
				c.new_id = d.new_id
				AND
				d.lang_id = '".$_SESSION['lang_id']."'
				AND c.published
				
				AND ( d.title LIKE '%".$sef_url."%' OR d.description LIKE '%".$sef_url."%')
				
			  ";
			  
				$result = query($sql);
			
			   while ($row = mysql_fetch_object($result)) {
			?>
            
			<div class="new">
				<div class="title"><a href="<?=HTML_BASE.$_SESSION['lang']?>/news/<?=$row->sef_url?>"><?=$row->title?></a></div>
				<div class="content">
				<p><?=strip_tags(text_format($row->description, 200))?>...</p>
				</div>
				<a class="readmore" href="<?=HTML_BASE.$_SESSION['lang']?>/news/<?=$row->sef_url?>"><?=__Read_more?></a>
			</div>
			<?php }?>
				
            </div>    
			
			
			
		</div>
   
	
<?php

foot();
?>